namespace SenenFernandez.SmartExtensionMethods
{
    using System;
    using System.Collections.Generic;

    internal class DisplayCallback
    {
        private List<Display> monitors;

        public IEnumerable<Display> Monitors { get { return monitors; } }

        public DisplayCallback()
        {
            monitors = new List<Display>();
        }

        public bool Callback(IntPtr display, IntPtr handle, IntPtr parentDisplay, IntPtr parameters)
        {
            monitors.Add(new Display(display, handle));
            return true;
        }
    }
}